package com.hxzy.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hxzy.system.dto.SysDictTypeDTO;
import com.hxzy.system.entity.SysDictType;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
* @author Administrator
* @description 针对表【sys_dict_type(字典类型表)】的数据库操作Mapper
* @createDate 2023-03-10 11:56:11
* @Entity com.hxzy.entity.SysDictType
*/
@Mapper
@Repository
public interface SysDictTypeMapper extends BaseMapper<SysDictType> {
    List<SysDictType> search(@Param(value = "dto") SysDictTypeDTO sysDictTypeDTO);

    /**
     * 更新字典的状态
     * @param dictId
     * @param status
     * @return
     */
    @Update(value = "update sys_dict_type set status=#{status} where id=#{dictId}")
    int updateByState(@Param(value = "dictId")Long dictId, @Param(value = "status")String status);
}




